//酷9专用JS，更多JS请加入酷9更新群424765458
function main(item) {

let url = item.url;
    const id = ku9.getQuery( url,  "id" ) || 'gzws';
    const jsonUrl = 'https://api.gzstv.com/v1/tv/'+id;
    const headers = {'User-Agent': 'Mozilla/5.0',
    'Referer': 'https://api.gzstv.com'};
    let playData = ku9.get(jsonUrl, JSON.stringify(headers));
    let regex = /stream_url":"(https:\/\/.+?)"/;
    let match = playData.match(regex);    
    let finalUrl =match[1];
    return JSON.stringify({ url: finalUrl, headers: { referer: 'https://api.gzstv.com' } }); 
}